<?xml version='1.0' encoding='UTF-8' ?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml"
      xmlns:ui="http://java.sun.com/jsf/facelets"
      xmlns:f="http://java.sun.com/jsf/core"
      xmlns:h="http://java.sun.com/jsf/html"
      xmlns:a4j="http://richfaces.org/a4j"
      xmlns:p="http://primefaces.prime.com.tr/ui"
      xmlns:rich="http://richfaces.org/rich">

    <ui:composition template="../templates/process.xhtml">
        <ui:define name="process">
            <rich:tab id="expendituresTab" label="Ввести видатки">
             
                    <h:panelGrid columns="2">

                     <a4j:commandButton value="Внести видатки" action="#{treeBean.addExpend}"
                               reRender="dataPanel" oncomplete="#{rich:component('dataPanel')}.show()" />

                    </h:panelGrid>  
                
            </rich:tab>

             <rich:tab id="showTab" label="Переглянути графік ">

                    <h:panelGrid columns="2">


                    <h:outputText value="Виберіть рік :"/>
                    <h:selectOneMenu value="#{treeBean.selectedItem}">
                          <f:selectItems
                              value="#{treeBean.yearsList}" />
                    </h:selectOneMenu>

                     <a4j:commandButton value="Показати графік" action="#{treeBean.showExpendituresGraphic}" reRender="chartPanel" oncomplete="#{rich:component('chartPanel')}.show()"/>

                    </h:panelGrid>

            </rich:tab>

            <ui:insert name="expendituresChild"/>
        </ui:define>
    </ui:composition>

</html>